<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="author" content="liushuai" />
<meta name="copyright" content="SINA 1996-2010" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>添加内容-app</title>
<link href="/admin/style/user/admin.css" type="text/css" rel="stylesheet" media="screen" />
<!--[if IE]>
<link href="/admin/sytle/user/admin_ie.css" type="text/css" rel="stylesheet" media="screen" />
<![endif]-->
<script src ="/js/base/jquery.js"></script>
<script src ="/js/base/jquery.tmpl.js"></script>
<script src="/js/common/bind_add_album_and_love.js"></script>
<script src ="/js/common/tips.js"></script>
<script type="text/javascript" src="/js/common/uploader.js"></script>
<script src="/js/common/bind_add_atten.js"></script>
<script src ="/js/common/user_message.js"></script>
<script src ="/js/common/detail_poup.js"></script>
<script src ="/js/common/user_message.js"></script>
<script src ="/js/common/pubu.js"></script>
<script src ="/js/common/gototop.js"></script>
<script src ="/js/base/blocksit.min.js"></script>
<script src ="/js/base/blocksit.min.js"></script>
<script src ="/js/base/jquery.masonry.min.js"></script>


</head>
<body>
<div id="container">
	<div class="sec-title">
		<h3>添加内容-app</h3>
	</div>
	<div class="wrap">
		<div class="topic_tab">
		
		</div>
		<div class="user-info-edit">
			
			<table>
				
				<tr>
					<th>小图：</th>
					<td colspan="3">
					<div id="yxxiu_uploader"></div>
					<img src="" id="update_pic">
					</td>
				</tr>

				<form method="post" action="" id="form_add" enctype="multipart/form-data">
				<input type="hidden" id="id" name="id" value="{%$g_show.data.id%}"/>
				<input type="hidden" name="pic" id="pic" value="">
				<tr>
					<th>内容：</th> 	
					<td colspan="3">
						<input type="text" id="content" name="content" value="{%$g_show.data.content%}" size=70/>
					</td>
				</tr>
				
				<tr>
					<th>链接：</th> 	
					<td colspan="3">
						<input type="text" id="link" name="link" value="{%$g_show.data.link%}" size=70 />
					</td>
				</tr>
				
				
					<tr>
					<td colspan="4">
						<div class="banner-btn">
							<input type="submit"  value="保 存" />
						</div>
					</td>
				</tr>	
					</form>
				</table>
				
		</div>
	</div>
</div>

<script type="text/javascript">
$(function(){
	options={
		callback:'/js/uploader_callback.html',
		container:'#yxxiu_uploader',
		script:'/interface/common/json_pic_upload.php',
		size:"300|300",
		thumb:1,
		onComplete:function(res){
				
				
				if(res.error == 1)
				{
					alert(res.errormsg);
				}
				else
				{	
					if(res.pic)
					{
						$("#update_pic").attr("src",res.pic)
						$("#pic").val(res.pic);
					}
					else
					{
						alert("未知错误！")
					}
					
				}
			
				
			return ;
				},
		errorId:'#errormsg'
	};
	YOUXIXIU.ImgUploader.init(options);
});

//表单提交事件
$("#form_add").bind('submit', function() {
		$.post('app_manage_edit_post.php', $("#form_add").serialize(), function(data) {

			if (data.error == 1) {
				
				alert(data.errmsg);
				
			} else {
				//成功

				alert("操作成功！");
				location.href="app_manage_index.php";
				
			}
		
	}, 'json');
	
	return false;
});
</script>



执行时间：{%$execute_time_last%}    SQL：{%$execute_sql_count%}	SQLTIME:{%$execute_sql_call_time%}
</body>
</html>